package cn.thinkluck.pattern.command;

/**
 * 关灯命令
 *
 * @Author liutao
 * @DateTime 2024/8/4 下午3:48
 */
public class LightOffCommandImpl implements Command {
    /**
     * 持有命令接收者
     * 灯对象
     */
    private Light light;

    public LightOffCommandImpl(Light light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.off();
    }
}
